#ifndef __BIT_OPERATION_H__
#define __BIT_OPERATION_H__

#ifdef __cplusplus
 extern "C" {
#endif

#include "stdint.h"

#define BIT_SET_BY_INDEX(x,i)               (x = ((x) | (((uint64_t)(0x1)) << (i))))
#define BIT_CLEAR_BY_INDEX(x,i)               (x = ((x) & (~(((uint64_t)(0x1)) << (i)))))
#define BIT_STATUS_BY_INDEX(x,i)              (((x) & (((uint64_t)(0x1)) << (i))) ? 1:0)

#ifdef __cplusplus
}
#endif

#endif
